﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>无标题页</title>
    <link rel="Stylesheet" type="text/css" href="../Css/global.css" />
    <script language="javascript" type="text/javascript" src="jquery_its.js"></script>
    <script language="javascript" type="text/javascript" src="../jslib/ctn.js"></script>
    <script language="javascript" type="text/javascript" src="xmldocument.js"></script>
    <script language="javascript" type="text/javascript" >
    function init(){
        $.ajax({
             type: "GET",
             url: "qqmenu.xml?" + new Date().getTime(), 
            dataType: "xml",
            success:test 
        })  
    }
    function test(xmlDoc){
        var d1 = new Date().getTime();
        var t = $("menus>menu1", xmlDoc);
        var a = $("menu[target='left']", t.get(0));
        a.map = Array.prototype.map;
        //$.extend(a, 
        var e = a.map(function(v){return new XMLElem(v).attr('name');})
        //a.val(v);
        //var c = new Array().from(a);
        //c.map(function(v){return new XMLElem(v);})
        var d2 = new Date().getTime();
        var b = new XMLDoc(xmlDoc).selectNodes("menus/menu/menu");
        var d3 = new Date().getTime();
        $("#tc").html((d2 - d1) + "," + e.length +  "," + (d3 - d2) + "," + b.length);
        $("p").text("dd");
//        alert($("p").text());
//        var ch = $('div').children();
//        $("#p").text(ch.length);
    }
    </script>
</head>
<body onload="init()">
<div id="tc">
<p>dd<span>dd</span></p>
<p>dd</p>
</div>
<p id="p"></p>
</body>
</html>
